package belf.migrate.api.exception;

import belf.migrate.api.table.schema.TablePath;
import belf.migrate.core.exception.BelfRuntimeException;

public class FactoryInitException extends BelfRuntimeException {
    private static final String MSG = "Table %s does not exist in Catalog %s.";

    public FactoryInitException(String catalogName, TablePath tablePath) {
        this(catalogName, tablePath, null);
    }

    public FactoryInitException(String catalogName, TablePath tablePath, Throwable cause) {
        super(
                APIErrorCode.FACTORY_INITIALIZE_FAILED,
                String.format(MSG, tablePath.getFullName(), catalogName),
                cause);
    }
}
